<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			// rem布局实现pc端网页自适应
			function setRem() {
				let designSize = 1920; // 设计图尺寸
				let html = document.documentElement;
				let wW = html.clientWidth; // 窗口宽度
				let rem = wW * 100 / designSize;
				document.documentElement.style.fontSize = rem + 'px';
			}
			window.addEventListener('load', setRem);
			window.addEventListener('resize', setRem);
		</script>
	</head>
	<body>
		<div id="root"></div>
	</body>
</html>
